const defaultState = {
    searchfocused:false,
    mouseIn:false,
    list:[],
    page:1,

};
export default (state = defaultState,action) => {
    switch(action.type){
        case 'SEARCH_INPUT_FOUCE':
            state.searchfocused = true;
            return {...state}
        case 'SEARCH_INPUT_BIUR':
            state.searchfocused = false;
            return {...state}
        case 'GET_HOT_SEARCH_LIST':
            state.list = action.data;
            state.totalPage =action.totalPage;
            return {...state}
        case 'MOUSE_ENT':
            state.mouseIn = true;
            return {...state}
        case 'MOUSE_OUT':
            state.mouseIn = false;
            return {...state}
        case 'GET_NEXT_PAGE':
            state.page = action.page +1;
            return {...state}
        case 'GET_FIST_PAGE':
            state.page = 1;
            return {...state}
        default:
            return state
    }
    
}

